<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMoneysTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('moneys', function (Blueprint $table) {
            $table->increments('id');
            $table->decimal('price')->default('0.00')->comment('充值金额');
            $table->decimal('give_price')->default('0.00')->comment('赠送金额');
            $table->integer('sort')->default('0')->comment('排序');
            $table->json('options')->nullable()->comment('其他规则');
            $table->tinyInteger('status')->default('0')->comment('状态:0=正常,1=隐藏');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('moneys');
    }
}
